package com.shujia.day16.tcp.tcp1;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Client2 {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost",6666);
        // 获取输出流
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("Hello 这是客户端发送的消息".getBytes());
        outputStream.flush();
        while (true){
        }
    }
}
